package com.supply.supplymanage.biz;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.supply.supplymanage.dao.EntrepotMapper;
import com.supply.supplymanage.entity.Entrepot;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service
public class EntrepotBizImpl implements EntrepotBiz{


    @Resource
    private EntrepotMapper entrepotMapper;
    @Override
    public PageInfo queryentrepot(Integer pageNum) {
        PageHelper.startPage(pageNum,3);
        List<Map> maps=entrepotMapper.queryentrepot();
        PageInfo<Map> pageInfo = new PageInfo<Map>(maps);
        return pageInfo;
    }


    @Override
    public int addentrepot(Entrepot entrepot) {
        entrepotMapper.addentrepot(entrepot);
        return 0;
    }
}